package cn.dust.design.principle.liskovsubstitution;

/**
 * @Author: dust
 * @Date: 2019/11/24 21:40
 */
public class Test {

    public static void resize(Rectangle rectangle){
        while (rectangle.getWidth()<=rectangle.getLength()){
            rectangle.setWidth(rectangle.getWidth()+1);
            System.out.println(rectangle.getWidth()+"  "+rectangle.getLength());
        }
        System.out.println("resize方法结束");

    }

    public static void main(String[] args) {
//        Rectangle rectangle=new Rectangle(20,10);
//        resize(rectangle);
        Square s=new Square();
        s.setLength(10);
        resize(s);
    }
}
